package com.demo2do.fms.entity.business;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 收入 （用于委托方销单）
 * 
 * @author Ysy
 *
 */
@Entity
@Table(name = "TBL_ALL_FINANCE")
public class Finance {
    
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "generator")
    @SequenceGenerator(name = "generator", sequenceName = "HIBERNATE_SEQUENCE", allocationSize = 1)
    private Long id;
    
    /** 调度指令号  */
    private String loadNumber;
    
    /** 收费  */
    private BigDecimal fee;
    
    /** 单价  */
    private BigDecimal feeRate;
    
    /** 公里数  */
    private Long kilometer;
    
    /** 调度指令ID  */
    private Long shipmentId;
    
    private Long parentId;
    
    /** finance标识 */
    private Long shipmentFinanceId;
    
    private Long firstShipmentId;
    
    /** 合并目标的调度单号 */
    private String mergeLoadnumber;
    
    /** 委托方ID  */
    private Long consignorId;
    
    /** 运输公司ID  */
    private Long companyId;
    
    private Long customerId;
    
    private Long orderId;
    
    /** 起始装卸地  */
    private Long srcWhId;
    
    /** 目的装卸地  */
    private Long destWhId;
    
    /**
     * 勾送状态
     *       
     *       N - 不可结算
     *       Y - 可结算
     *       C - 未勾送
     *       S - 已勾送
     */
    @Column(name = "COLLECT_STATUS")
    private String collectStatus;
    
    /** 是否销单 */
    @Column(name = "IS_BALANCED")
    private Boolean balanced;
    
    /** 销单时间  */
    private Date balancedDate;
    
    /** 是否暂估  */
    @Column(name = "IS_TEMPORARY")
    private Boolean temporary;
    
    /** 是否开票 */
    @Column(name = "IS_SAP_INVOICE")
    private Boolean invoice;
    
    /** 开票日期 */
    @Column(name = "SAP_INVOICE_DATE")
    private Date invoiceDate;
    
    private String sessionId;
    
    /** 创建日期 */
    private Date createDate;
    
    /** 操作人  */
    private String operator;
    
    /** 最后更新时间 */
    private Date lastModifiedDate;
    
    /** 是否启用  */
    @Column(name = "IS_DISABLED")
    private Boolean disabled;
    
    /**
     * 
     * the default constructor
     */
    public Finance() {

    }
    
    /**
     * 更新勾送状态
     * 
     * @param collectStatus
     * @return
     */
    public Finance editCollectStatus(String collectStatus) {
        this.collectStatus = collectStatus;
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the loadNumber
     */
    public String getLoadNumber() {
        return loadNumber;
    }

    /**
     * @return the fee
     */
    public BigDecimal getFee() {
        return fee;
    }

    /**
     * @return the feeRate
     */
    public BigDecimal getFeeRate() {
        return feeRate;
    }

    /**
     * @return the kilometer
     */
    public Long getKilometer() {
        return kilometer;
    }

    /**
     * @return the shipmentId
     */
    public Long getShipmentId() {
        return shipmentId;
    }

    /**
     * @return the parentId
     */
    public Long getParentId() {
        return parentId;
    }

    /**
     * @return the shipmentFinanceId
     */
    public Long getShipmentFinanceId() {
        return shipmentFinanceId;
    }

    /**
     * @return the firstShipmentId
     */
    public Long getFirstShipmentId() {
        return firstShipmentId;
    }

    /**
     * @return the mergeLoadnumber
     */
    public String getMergeLoadnumber() {
        return mergeLoadnumber;
    }

    /**
     * @return the consignorId
     */
    public Long getConsignorId() {
        return consignorId;
    }

    /**
     * @return the companyId
     */
    public Long getCompanyId() {
        return companyId;
    }

    /**
     * @return the customerId
     */
    public Long getCustomerId() {
        return customerId;
    }

    /**
     * @return the orderId
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * @return the srcWhId
     */
    public Long getSrcWhId() {
        return srcWhId;
    }

    /**
     * @return the destWhId
     */
    public Long getDestWhId() {
        return destWhId;
    }

    /**
     * @return the collectStatus
     */
    public String getCollectStatus() {
        return collectStatus;
    }

    /**
     * @return the balanced
     */
    public Boolean getBalanced() {
        return balanced;
    }

    /**
     * @return the balancedDate
     */
    public Date getBalancedDate() {
        return balancedDate;
    }

    /**
     * @return the temporary
     */
    public Boolean getTemporary() {
        return temporary;
    }

    /**
     * @return the invoice
     */
    public Boolean getInvoice() {
        return invoice;
    }

    /**
     * @return the invoiceDate
     */
    public Date getInvoiceDate() {
        return invoiceDate;
    }

    /**
     * @return the sessionId
     */
    public String getSessionId() {
        return sessionId;
    }

    /**
     * @return the createDate
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * @return the operator
     */
    public String getOperator() {
        return operator;
    }

    /**
     * @return the lastModifiedDate
     */
    public Date getLastModifiedDate() {
        return lastModifiedDate;
    }

    /**
     * @return the disabled
     */
    public Boolean getDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param loadNumber the loadNumber to set
     */
    public void setLoadNumber(String loadNumber) {
        this.loadNumber = loadNumber;
    }

    /**
     * @param fee the fee to set
     */
    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    /**
     * @param feeRate the feeRate to set
     */
    public void setFeeRate(BigDecimal feeRate) {
        this.feeRate = feeRate;
    }

    /**
     * @param kilometer the kilometer to set
     */
    public void setKilometer(Long kilometer) {
        this.kilometer = kilometer;
    }

    /**
     * @param shipmentId the shipmentId to set
     */
    public void setShipmentId(Long shipmentId) {
        this.shipmentId = shipmentId;
    }

    /**
     * @param parentId the parentId to set
     */
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    /**
     * @param shipmentFinanceId the shipmentFinanceId to set
     */
    public void setShipmentFinanceId(Long shipmentFinanceId) {
        this.shipmentFinanceId = shipmentFinanceId;
    }

    /**
     * @param firstShipmentId the firstShipmentId to set
     */
    public void setFirstShipmentId(Long firstShipmentId) {
        this.firstShipmentId = firstShipmentId;
    }

    /**
     * @param mergeLoadnumber the mergeLoadnumber to set
     */
    public void setMergeLoadnumber(String mergeLoadnumber) {
        this.mergeLoadnumber = mergeLoadnumber;
    }

    /**
     * @param consignorId the consignorId to set
     */
    public void setConsignorId(Long consignorId) {
        this.consignorId = consignorId;
    }

    /**
     * @param companyId the companyId to set
     */
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    /**
     * @param customerId the customerId to set
     */
    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    /**
     * @param orderId the orderId to set
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * @param srcWhId the srcWhId to set
     */
    public void setSrcWhId(Long srcWhId) {
        this.srcWhId = srcWhId;
    }

    /**
     * @param destWhId the destWhId to set
     */
    public void setDestWhId(Long destWhId) {
        this.destWhId = destWhId;
    }

    /**
     * @param collectStatus the collectStatus to set
     */
    public void setCollectStatus(String collectStatus) {
        this.collectStatus = collectStatus;
    }

    /**
     * @param balanced the balanced to set
     */
    public void setBalanced(Boolean balanced) {
        this.balanced = balanced;
    }

    /**
     * @param balancedDate the balancedDate to set
     */
    public void setBalancedDate(Date balancedDate) {
        this.balancedDate = balancedDate;
    }

    /**
     * @param temporary the temporary to set
     */
    public void setTemporary(Boolean temporary) {
        this.temporary = temporary;
    }

    /**
     * @param invoice the invoice to set
     */
    public void setInvoice(Boolean invoice) {
        this.invoice = invoice;
    }

    /**
     * @param invoiceDate the invoiceDate to set
     */
    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    /**
     * @param sessionId the sessionId to set
     */
    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    /**
     * @param createDate the createDate to set
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * @param operator the operator to set
     */
    public void setOperator(String operator) {
        this.operator = operator;
    }

    /**
     * @param lastModifiedDate the lastModifiedDate to set
     */
    public void setLastModifiedDate(Date lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

}
